<%
  #File:    /app/views/manage/functions/update.rhtml
  #Author:  Andrew Stone
  #Created: 05.31.2006
  title = "Updating  #{@function.name}"
%>
<%=error_messages_for("function")%>

<%=start_form_tag("update")%>

<%=start_large_div_wrapper%>
  <div id="page_title"><%=title%></div>
  <div id="large">
    <table>
      <tbody>
        <tr>
          <td class="req_label">Function name:</td>
          <td class="data"><%=h(@function.name)%></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td class="data">
            <strong>
              Select which folders will contain a link to this function
            </strong>
          </td>
        </tr>
        <tr>
          <td class="req_list_label">* Folders:</td>
          <td class="list_data">
            <ul id="functions" class="checklist">
              <%
                i = 0
                Folder.list_for_selection.each do |prt|
                  bg = row_class(i)
                  i += 1 %>
                  <%=checklist_li(prt[:name],"folder",prt[:id],bg,@function.belongs_to_folder?(prt[:id]))%>
              <%
                end
              %>
            </ul>
          </td>
        </tr>
      </tbody>
    </table>
    <%=hidden_field("function","id")%>
    <div id="actions">
      <%=submit_tag("Update")%>
    </div>
  </div>
<%=end_div_wrapper%>
<%=end_form_tag%>

